-- GENERATED SPELL FOR [Coilfang Oracle] --


function spell0_17803(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(22582,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17803', 8308, 1)
end

function spell1_17803(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(37865,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17803', 8345, 1)
end

function spell2_17803(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(22883,pUnit)
pUnit:RegisterEvent('Sorts_17803', 3500, 1)
end

function spell3_17803(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(31730,pUnit)
pUnit:RegisterEvent('Sorts_17803', 3500, 1)
end

function spell4_17803(pUnit, Event) --@Sonic Burst,Self--
pUnit:FullCastSpellOnTarget(8281,pUnit)
pUnit:RegisterEvent('Sorts_17803', 6276, 1)
end

function Sorts_17803(pUnit, Event)
local choix_sorts_17803 = math.random(0, 4)
if choix_sorts_17803 == 0 then
pUnit:RegisterEvent('spell0_17803', 1, 1)
end
if choix_sorts_17803 == 1 then
pUnit:RegisterEvent('spell1_17803', 1, 1)
end
if choix_sorts_17803 == 2 then
pUnit:RegisterEvent('spell2_17803', 1, 1)
end
if choix_sorts_17803 == 3 then
pUnit:RegisterEvent('spell3_17803', 1, 1)
end
if choix_sorts_17803 == 4 then
pUnit:RegisterEvent('spell4_17803', 1, 1)
end
end

function mob17803_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17803', math.random(1500, 3000), 1)
end

function mob17803_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17803_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17803_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17803, 1, 'mob17803_Action')
RegisterUnitEvent(17803, 2, 'mob17803_Leave')
RegisterUnitEvent(17803, 3, 'mob17803_Kill')
RegisterUnitEvent(17803, 4, 'mob17803_Die')
